package com.example.wastes.message.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.wastes.common.pojo.Message;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MessageMapper extends BaseMapper<Message> {
    List<Message> findMessageMerge(Integer id);
    List<Message> findMessageMerge1(Integer userid);
    List<Message> findMessageName(String phones);

    @Insert("insert into tb_message(address,number,name,phone,userid) values (#{address},#{number},#{name},#{phone},#{userid})")
    int saveMessage(@Param("address") String address, @Param("number") String number, @Param("name") String name,@Param("phone") String phone,@Param("userid") String userid);
}
